from rest_framework import serializers

from user.models import auto, Author


class autoserializers(serializers.ModelSerializer):
    class Meta:
        model = auto
        fields = '__all__'



class authorserializers(serializers.ModelSerializer):
    type=autoserializers(read_only=True)
    type_id=serializers.IntegerField(write_only=True)
    class Meta:
        model =Author
        fields = '__all__'
